﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Web_Main.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="Resources" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    ViewPage1
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="submenu"><span class="sbla" id="sblhotel"></span><a class="sba" href="javascript:InfoTab.open('hotel');" id="sm_hotel"><% = Resource.Hotel%></a><span class="sbra" id="sbrhotel"></span>
<span class="sbli" id="sblservice"></span><a class="sbi" href="javascript:InfoTab.open('service');" id="sm_service"><% = Resource.Services%></a><span class="sbri" id="sbrservice"></span>
<span class="sbli" id="sblifinfo"></span><a class="sbi" href="javascript:InfoTab.open('ifinfo');" id="sm_ifinfo"><% = Resource.Help%></a><span class="sbri" id="sbrifinfo"></span></div>
<div id="tab_info_content">
    <div id="InfoTab_hotel_content"><div class="box ttb cftt">
    <h1><% = Resource.HowToCharge%></h1>
                                        <span class="lr"><a href="#" target="_blank"> <img height="18" src="/Content/images/help.png"/> Hướng dẫn cài đặt tính tiền</a></span>

</div>

   <br/>
    <input type="text" maxlength="10"  class="qla-number-only xcgasfas" />
    
    <input class="txt2 otcost otcostvnd qla-number-only" type="text" id="slctOneCash" value="5"/> VND(%)                                                                      
    
     <script type="text/javascript" >

     setTimeout("CallButton()", 1000);
     function CallButton()
     {
         document.getElementById("sm_hotel").click();    
     }
</script>

<div id="notificationadd" class="reveal-modal" data-animation="none" data-animationspeed="10"
                    data-closeonbackgroundclick="true" data-dismissmodalclass="close-reveal-modal">
                    <div class="reveal-modal-title">
                        <span>Thông báo</span></div>
                    <div class="reveal-modal-content">
                        <p id="messagetitle">
                        </p>
                        <br />
                        <button class="close-reveal-modal">
                            Đóng</button>
                        <a class="close-reveal-modal close-reveal">
                            <img src="/Content/images/exit.png" title="exit" alt="exit" /></a>
                    </div>
                </div>
                <div style="display: none;">
                    <a data-reveal-id="notificationadd" id="amessage">inline</a>
                </div>
                
 <script type="text/javascript" >
     function EditCash(id) {
         var convert = $("#Convert" + id).val().trim();
         if (convert == "") {
             $("#messagetitle").text("Vui lòng nhập tỉ giá");
             $("#Convert" + id).focus();
             $("#amessage").click();
             return false;
         }
         var slctOneCash = $("#slctOneCash" + id).val().trim();
         if (slctOneCash == "") {
             $("#messagetitle").text("Vui lòng nhập thông tin quá giờ");
             $("#slctOneCash" + id).focus();
             $("#amessage").click();
             return false;
         }
         var slctTwoCash = $("#slctTwoCash" + id).val().trim();
         if (slctTwoCash == "") {
             $("#messagetitle").text("Vui lòng nhập thông tin quá giờ");
             $("#slctTwoCash" + id).focus();
             $("#amessage").click();
             return false;
         }
         var slctThreeCash = $("#slctThreeCash" + id).val().trim();
         if (slctThreeCash == "") {
             $("#messagetitle").text("Vui lòng nhập thông tin quá giờ");
             $("#slctThreeCash" + id).focus();
             $("#amessage").click();
             return false;
         }
         var slctFreeCash = $("#slctFreeCash" + id).val().trim();
         if (slctFreeCash == "") {
             $("#messagetitle").text("Vui lòng nhập thông tin vào trước");
             $("#slctFreeCash" + id).focus();
             $("#amessage").click();
             return false;
         }
         var slctTimeCash = $("#slctTimeCash" + id + " option:selected").val();
         var slctCurencyCash = $("#slctCurencyCash" + id + " option:selected").val();
         var slctRoundingCash = $("#slctRoundingCash" + id + " option:selected").val();



         $.ajax({
             type: "POST",
             url: '/About/EditCash',
             data: {
                 id: id,
                 slctTimeCash: slctTimeCash,
                 slctCurencyCash: slctCurencyCash,
                 convert: convert,
                 slctRoundingCash: slctRoundingCash,
                 slctOneCash: slctOneCash,
                 slctTwoCash: slctTwoCash,
                 slctThreeCash: slctThreeCash,
                 slctFreeCash: slctFreeCash

             },

             success: function (data) {
                 //alert('cannot Find  resource');
                 //$("#lblfloor" + id).val(name);
                 window.location = "/About/About";
             },
             statusCode: {
                 404: function (content) {
                     //alert('cannot Find  resource');
                 },
                 505: function (content) {

                     // alert('internal server error');
                 },
                 200: function (data) {

                     // alert('server found');
                 },

                 500: function (content) {

                     //alert('Error found');
                 }
             },

             error: function (req, status, errorObj) {
                 alert('time out');
             }

         });
         return true;
     }
 </script>
                

</asp:Content>
